package com.bianxianmao.lastknow.adapter;

import android.support.v4.app.FragmentManager;
import android.support.v4.app.FragmentPagerAdapter;

import com.bianxianmao.base.BaseFragment;

import java.util.List;

/**
 * Created by Administrator on 2017/8/8.
 */

public class LastknowAdapter extends FragmentPagerAdapter {
    private List<BaseFragment> fragments;

    private String[] mTitles;

    public LastknowAdapter(FragmentManager fm, List<BaseFragment> fragments, String[] mTitles) {
        super(fm);
        this.fragments = fragments;
        this.mTitles = mTitles;
    }

    @Override
    public BaseFragment getItem(int position) {
        return fragments.get(position);

    }


    @Override
    public int getCount() {
        return mTitles.length;
    }

    @Override
    public CharSequence getPageTitle(int position) {
        return mTitles[position];
    }
}
